package domain.entities;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created with IntelliJ IDEA.
 * User: vgonzalez
 * Date: 31/10/12
 * Time: 12:48
 * To change this template use File | Settings | File Templates.
 */

@Entity
@Table(name = "externalValidation", catalog = "bms")
public class ExternalValidation implements java.io.Serializable {

    private Integer id;
    private Date expirationDate;
    private String type;
    private Vendorcentral vendorcentral;

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "expiration_date", length = 10)
    public Date getExpirationDate() {
        return this.expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }

    @Column(name = "type")
    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @ManyToOne()
    public Vendorcentral getVendorcentral() {
        return this.vendorcentral;
    }

    public void setVendorcentral(Vendorcentral vendorcentral) {
        this.vendorcentral = vendorcentral;
    }
}
